package com.portal4kids.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "services_art")
public class ServicesArt implements Serializable{
	private static final long serialVersionUID = 1378941157167457583L;
	private int id_art;
	private String name = "none";
	private int age =-1;
	private double time = 00.00;
	private String address = "none"; 
	private String typeOfArt = "none";
	private String technique = "none";
	private String description = " ";
	private int rating = 0;
	private int avarage = 0;
	private int numberOfVotes = 0;
	
	@Id
    @GeneratedValue
	public int getId_art() {
		return id_art;
	}
	public void setId_art(int id_art) {
		this.id_art = id_art;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		if(!name.isEmpty())
			this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		if(age > 0)
			this.age = age;
	}
	public double getTime() {
		return time;
	}
	public void setTime(double time) {
		if(time > 0.5)
			this.time = time;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		if(!address.isEmpty())
			this.address = address;
	}
	public String getTypeOfArt() {
		return typeOfArt;
	}
	public void setTypeOfArt(String typeOfArt) {
		if(!typeOfArt.isEmpty())
			this.typeOfArt = typeOfArt;
	}
	public String getTechnique() {
		return technique;
	}
	public void setTechnique(String technique) {
		if(!technique.isEmpty())
			this.technique = technique;
	}
	@Column(name="description", length=10000)
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		if(!description.isEmpty())
			this.description = description;
	}
	
	public int getRating() {
		return rating;
	}
	public void setRating(int rating) {
		this.rating = rating;
	}
	public int getAvarage() {
		return avarage;
	}
	public void setAvarage(int avarage) {
		this.avarage = avarage;
	}
	public int getNumberOfVotes() {
		return numberOfVotes;
	}
	public void setNumberOfVotes(int numberOfVotes) {
		this.numberOfVotes = numberOfVotes;
	}
	@Override
	public String toString() {
		return "ServicesArt [id_art=" + id_art + ", name=" + name + ", age="
				+ age + ", time=" + time + ", address=" + address
				+ ", typeOfArt=" + typeOfArt + ", technique=" + technique + "]";
	}
	

}
